package com.yuanfeng.base.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @ClassName BaseInvoiceAddressController
 * @Description
 * @Author hyq
 * @Date 2023/6/28 14:03
 * @Version 1.0
 **/
@RestController
@RequestMapping("base/invoiceAddress")
public class BaseInvoiceAddressController extends BaseController{


    /**
     * 查询发票地址模版信息
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/query/addressTmp")
    public ResponseResult queryAddressTmp(@RequestBody Map<String, Object> param) {
        ResponseResult result = baseInvoiceAddressService.queryAddressTmp(param);

        return result;
    }

    /**
     * 更新发票地址模版信息
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/update/addressTmp")
    public ResponseResult updateAddressTmp(@RequestBody Map<String, Object> param) {
        ResponseResult result = baseInvoiceAddressService.updateAddressTmp(param);

        return result;
    }

    /**
     * 删除发票地址模版信息
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/delete/addressTmp")
    public ResponseResult deleteAddressTmp(@RequestBody Map<String, Object> param) {
        ResponseResult result = baseInvoiceAddressService.deleteAddressTmp(param);

        return result;

    }

    /**
     * 查询收票人地址列表
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/invoice/address/list")
    public ResponseResult queryInvoiceAddressList(@RequestBody Map<String, Object> param) {
        ResponseResult result = baseInvoiceAddressService.queryInvoiceAddressList(param);

        return result;
    }

    /**
     * 插入发票地址模版信息
     *
     * @param param Map<Object,Object>
     * @return ResultResp
     */
    @PostMapping("/insert/addressTmp")
    public ResponseResult insertAddressTmp(@RequestBody Map<String, Object> param) {
        ResponseResult result = baseInvoiceAddressService.insertAddressTmp(param);

        return result;

    }

}
